#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QHBoxLayout>
#include <QLCDNumber>
#include <QLineEdit>
#include <QMainWindow>
#include <QScrollArea>
#include <QSlider>
#include <QSplitter>
#include <QToolButton>

#include <playlist/playlist.h>

class MainWindow : public QMainWindow
{
    Q_OBJECT

    //File menu
    QAction *actionLoadFiles;
    QAction *actionLoadFolder;
    QAction *actionQuit;
    //playback menu
    QAction *actionPreviousTrack;
    QAction *actionPlay;
    QAction *actionStop;
    QAction *actionNextTrack;
    QAction *actionPause;
    QAction *actionShuffle;
    QAction *actionNone;
    QAction *actionSingle;
    QAction *actionAlbum;
    QAction *actionAll;
    QAction *actionMute;
    QAction *actionVolumeUp;
    QAction *actionVolumeDown;
    //playlist menu
    QAction *actionOpenPlaylist;
    QAction *actionSavePlaylist;
    QAction *actionSelectAll;
    QAction *actionClearAll;

    //Buttons actions
    QAction *actionRepeat;

    QSplitter *splitter;
    QScrollArea *tabScrollArea;
    //to make playlist resizable
    QScrollArea *playlistScrollArea;
    //playlist page
    PlaylistPage * playlistPage;
    //playlist tab page
    PlaylistTab *playlistTab;
    QToolButton *addButton;
    QToolButton *remButton;
    QToolButton *selButton;
    QToolButton *sortButton;
    QLineEdit *playlistSearchLine;
    QToolButton *viewButton;
    QToolButton *saveButton;
    QHBoxLayout *horizontalLayout;
    QSlider *volSlider;
    QSlider *posSlider;
    QLCDNumber *lcdNumber;
    QToolBar *toolbar;
    QStatusBar *statusBar;

    Playlist *playlist;

    void initActions();
    void initGUI();
    void initMenu();
    void initToolbar();
    void createConnections();
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void setCompactMode(bool);
    
};

#endif // MAINWINDOW_H
